# 使用PHP基础镜像
FROM php:7.4-fpm

RUN apt-get update
# 安装PHP扩展
RUN apt-get install -y libjpeg62-turbo-dev libpng-dev libfreetype6-dev && \
    docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \
    docker-php-ext-install gd
# memcached扩展
RUN apt-get install -y libmemcached-dev zlib1g-dev && \
    pecl install memcached && \
    docker-php-ext-enable memcached
# imagick扩展
RUN apt-get install -y libmagickwand-dev && \
    pecl install imagick && \
    docker-php-ext-enable imagick
# sodium扩展
RUN apt-get install -y libsodium-dev && \
    pecl install libsodium && \
    docker-php-ext-enable sodium
# pdo_mysql扩展
RUN docker-php-ext-install pdo pdo_mysql
# redis扩展
RUN pecl install redis && docker-php-ext-enable redis
# bcmath扩展
RUN docker-php-ext-install bcmath
# pcntl扩展
RUN docker-php-ext-install pcntl
# zip扩展
RUN apt-get install -y libzip-dev && docker-php-ext-install zip
# swoole扩展
RUN pecl install swoole-4.6.7 && docker-php-ext-enable swoole